1. Field of the Invention
The invention relates to an image compensating method, and more particularly to a method for filling a hole in a virtual view image warped from a two-dimensional image.
2. Description of the Related Art
FIG. 1 illustrates the Depth-Image-Based Rendering (DIBR) technology capable of generating a three-dimensional image by using a two-dimensional image, and a depth map generated by a depth detector (not shown) and corresponding to the two-dimensional image. In the DIRB technology, the two-dimensional image is processed based on the depth map using image warping to generate various virtual view images, such as left virtual view images. For example, FIG. 2 shows an example of the two-dimensional image, FIG. 3 shows an example of the depth map corresponding to a foreground image region of the two-dimensional image of FIG. 2, and FIG. 4 shows an example of the left virtual view image warped from the two-dimensional image of FIG. 2. However, the DIBR technology has intrinsic limitations. Holes caused by insufficient pixel values in the two-dimensional image appear in the warped virtual view images because the holes do not have correspondence to the two-dimensional image. For example, in FIG. 4, a plurality of holes 11 are generally formed in boundaries between a foreground image region (A) and a background image region (B) of the two-dimensional image. Thus, the holes in each warped virtual view image would be filled using hole-filling technology. Finally, the filled virtual view images are combined together to form the three-dimensional image.
A conventional hole-filling method (hereinafter referred to as the first conventional method) has been proposed in an article by Criminisi et al., entitled “Region Filling and Object Removal by Exemplar-Based Image Inpainting”, IEEE Transaction on Image Processing, vol. 13, No. 9, September 2004. In the first hole-filling method, an original image is searched to select an image region most similar to a target image region containing holes as a candidate image region for filling the holes within the target image region. Such method requires a lot of effort and takes a great deal of time, thereby resulting in an inferior efficiency. In addition, because the candidate image region is selected from the whole original image, the candidate image region may be selected from a foreground image region of the original image. Therefore, distortions may occur in the filled image.
Another conventional hole-filling method (hereinafter referred to as the second conventional method) has been proposed in an article by Lou et at., entitled “Depth-aided Inpainting for Restoration of Multi-view Images Using Depth-Image-Based Rendering”, Journal of Zhejiang University SCIENCE A, pp. 1738-1749, 2009 10(12). In the second hole-filling method, a candidate image region for filling holes in an original image would not be selected from a foreground image region of the original image. In order to save processing time, searching range is reduced to a range around the holes. However, improvements may be made to the second hole-filling method.